﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.JCI.Dal;
using System.Data;
using Microsoft.JCI.Common.Entity;
using Microsoft.JCI.Common.Utility;
using System.Transactions;

namespace Microsoft.JCI.Bll
{
    public class DisWorkingVendorFileItemBll:BllBase
    {
        /// <summary>
        /// 保存工作单
        /// </summary>
        /// <param name="OrderEntity"></param>
        /// <param name="ItemEntity"></param>
        /// <param name="CustomerEntity"></param>
        public void SaveNewWorkingOrder(DisWorkingVendorOrderEntity OrderEntity, DisWorkingVendorFileItemEntity ItemEntity)
        {
            using (System.Transactions.TransactionScope tran = new TransactionScope())
            {
                if (OrderEntity != null)
                    base.InsertOrUpdate(OrderEntity);

                if (ItemEntity != null) base.InsertOrUpdate(ItemEntity);
           
                tran.Complete();
            }
        }
    }
}
